//////////////////////////////////////////////////////////////////////////////////////
  OPEN SP COMPILATION
//////////////////////////////////////////////////////////////////////////////////////

BACKUP

1) copy firefox/mozilla/extension/tidy -> tidy.004
2) remove the directory opensp
   XXXX lost spvalid.exe !
3) unzip opensp_1_5_branch.zip
4) rename opensp_1_5_branch to opensp
5) remove C:\my_prog\mozilla\src\firefox\mozilla\extensions\tidy\spvalid\osp152.lib
   -> will point to the real one next time

PRECOMPILATION TASK

1) Download OpenSP from cvs

set CVS_RSH=ssh
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openjade login 
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/openjade co -r opensp_1_5_branch -d opensp_1_5_branch sp 

2) Correction to make the compilation work 

correct this at the top of mssgen.pl (maybe configure would make the trick too?)

------------------------------------------------------
# Copyright (c) 1994 James Clark
# Copyright (c) 2000 Peter Nilsson
# See the file COPYING for copying permission.

use POSIX;

# Package and version.
$package = 'OPENSP';
$version = '1.5.2';
------------------------------------------------------

cd C:\my_prog\mozilla\src\firefox\mozilla\extensions\tidy\opensp
unix2dos SP.dsw
unix2dos lib/lib.dsp
unix2dos nsgmls/nsgmls.dsp
unix2dos sgmlnorm/sgmlnorm.dsp
unix2dos spam/spam.dsp
unix2dos spent/spent.dsp
unix2dos sx/sx.dsp
unix2dos spcat/spcat.dsp

-------------------------------------------------------

Correct content of ns

-------------------------------------------------------

3) compiling

4) readd the lib/open_static.dsp project in the project

> build-win32.bat
or 
> msdev SP.dsw /make "osp_static - win32 release"


------------------------------------------------------------------------------------------------------------------------
BUG
------------------------------------------------------------------------------------------------------------------------

set SP_CHARSET_FIXED=NO
set SP_ENCODING=UTF-8
set SP_BCTF=UTF-8

c:/www/opensp/onsgmls.exe -n -c C:\www\validator\htdocs\sgml-lib\sgml.soc -wvalid -wnon-sgml-char-ref -wno-duplicate -E0 c:\temp\propritaire\valid.html > out.txt 

c:/www/opensp/onsgmls.exe:554586320.2201:E: cannot open "c:\temp\propri�taire\valid.html" (No such file or directory)

------------------------------------

-> The problem seems to be that the filename sent is not in UTF8 

Why :

What happens is that OpenSP use the codingSystem for the file and the filename:
- The file is UTF8
- The filename is in SystemCharset (OpenSP think it is UTF8 too)
When starting, 
- the filename is changed from UTF8 to the internal charset of OpenSP
- the file is changed from UTF8 to the internal charset of OpenSP
When loading a file, 
- the filename is changed to the internal charset to UTF8 
  But this filename is wrong since the encryption is wrong. And file.open expect a name in SystemCharset
-> error

The change does this:
- add a new codingSystem : identity
- and use it for the input of the command line (this make the conversion from Command line to internal charset)
- and for the PosixStorageManager (File Storage Manager) (this make the conversion from internal charset to file.open) 



------------------------------------

Problem fix:
------------

include/CmdLineApp.h-50-  void usage();
include/CmdLineApp.h-51-  const CodingSystem *codingSystem();
include/CmdLineApp.h:52:  // MGUEURY
include/CmdLineApp.h-53-  const CodingSystem *fileCodingSystem();
include/CmdLineApp.h-54-  const CodingSystem *outputCodingSystem();
--
include/CmdLineApp.h-93-  const CodingSystem *lookupCodingSystem(const AppChar *codingName);
include/CmdLineApp.h-94-  const CodingSystem *codingSystem_;
include/CmdLineApp.h:95:  // MGUEURY
include/CmdLineApp.h-96-  const CodingSystem *fileCodingSystem_;
include/CmdLineApp.h-97-};
--
include/CmdLineApp.h-113-}
include/CmdLineApp.h-114-
include/CmdLineApp.h:115:// MGUEURY
include/CmdLineApp.h-116-inline
include/CmdLineApp.h-117-const CodingSystem *CmdLineApp::fileCodingSystem()
--
lib/CmdLineApp.cxx-525-    codingSystem_ = codingSystemKit_->identityCodingSystem();
lib/CmdLineApp.cxx-526-
lib/CmdLineApp.cxx:527:  // MGUEURY
lib/CmdLineApp.cxx-528-  fileCodingSystem_ = codingSystemKit_->identityCodingSystem();
lib/CmdLineApp.cxx-529-}
--
lib/CmdLineApp.cxx-557-    str += Char(s[i]);
lib/CmdLineApp.cxx-558-#else
lib/CmdLineApp.cxx:559:  // MGUEURY
lib/CmdLineApp.cxx-560-  StringC str(fileCodingSystem_->convertIn(s));
lib/CmdLineApp.cxx-561-#endif
--
lib/EntityApp.cxx-110-                        &systemCharset(),
lib/EntityApp.cxx-111-#ifndef SP_WIDE_SYSTEM
lib/EntityApp.cxx:112:                            // MGUEURY
lib/EntityApp.cxx-113-                        fileCodingSystem(),
lib/EntityApp.cxx-114-                        // codingSystem(),







